package com.graduation.rescuematerial.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.graduation.rescuematerial.pojo.Material;
import com.graduation.rescuematerial.vo.ApplicableByWareHouseNameVo;
import com.graduation.rescuematerial.vo.BaseMaterialVo;
import com.graduation.rescuematerial.vo.RespBean;
import com.graduation.rescuematerial.vo.UpdateMaterialVo;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author CaiShuangLian
 * @since 2022-04-22
 */
public interface MaterialService extends IService<Material> {

    /**
     * 查询可申请的物资列表（库存大于零的物资）
     * @return
     */
    RespBean getApplicableMaterial();

    /**
     * 获取本部门物资统计
     * @param companyName
     * @return
     */
    RespBean getStatistics(String companyName);

    //模糊查询
    RespBean fuzzyQuery(String companyName, String key);

    RespBean fuzzyQuery(String key);

    //系统管理员获取全部的物资
    RespBean getAllMaterial();

    //系统管理员修改物资信息
    RespBean updateMaterialInfo(BaseMaterialVo baseMaterial);

    //系统管理员增加物资
    RespBean addOne(BaseMaterialVo baseMaterialVo,String companyName);

    //获取本部门下所有物资
    RespBean getAll(String companyName);

    //获取本部门下的指定目录下的物资
    RespBean getAllByCatalog(String companyName, Integer catalogId);

    //获取仓库下可申请物资
    RespBean getApplicableMaterialByWareHouseName(ApplicableByWareHouseNameVo applicable);

    //本组织修改本组织的物资
    RespBean updateMaterial(UpdateMaterialVo materialVo, String companyName);

    //web——可视化统计物资种类数量
    RespBean getMaterialStatistics(String companyName);
}
